package com.erp.framework.model.delegate;

import com.erp.framework.SimpleConstants;
import com.erp.framework.model.dao.ServiceLocator;
import com.erp.framework.model.ejb.SimpleSearchMaintStyleHome;
import com.erp.framework.util.logger.Logger;

public class SimpleSearchMaintStyleDelegate extends SimpleBaseDelegate {
    private Object contr = null;

    protected Object getEjbManager() {

        if (this.contr == null) {
            try {
                SimpleSearchMaintStyleHome home = null;
                home = (SimpleSearchMaintStyleHome) ServiceLocator.getInstance()
                        .getHome(SimpleConstants.SIMPLE_SEARCH_MAINT_STYLE_EJB, SimpleSearchMaintStyleHome.class);
                this.contr = home.create();
            } catch (java.lang.reflect.UndeclaredThrowableException ue) {
                Logger.logExceptions(this, ue);
                Logger.error(this, "getEjbManager(), error: " + ue.getUndeclaredThrowable());
            } catch (Exception e) {
                Logger.logExceptions(this, e);
            }
        }
        return this.contr;
    }
    
}